package com.ddpt.platform.common.util;

import com.ddpt.platform.common.constant.CommonConstant;
import org.springframework.stereotype.Component;

/**
 * @author superhao
 * @date 2022/12/12 11:16
 */
@Component
public class NumberUtil {


    public static <T extends Number> boolean isValid(T num) {

        return (num != null && !CommonConstant.DEFAULT_STRING_ZERO.equals(num.toString()));
    }

    public static <T extends Number> boolean isInValid(T num) {

        return (num == null || CommonConstant.DEFAULT_STRING_ZERO.equals(num.toString()));
    }

}
